class ContractModel {
  int? errcode;
  String? errmsg;
  List<ContractItemModel>? data;
  String? message;

  ContractModel({this.errcode, this.errmsg, this.data, this.message});

  ContractModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    if (json['data'] != null) {
      data = <ContractItemModel>[];
      json['data'].forEach((v) {
        data!.add(ContractItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    return data;
  }
}

class ContractItemModel {
  int? id;
  String? name;
  String? employeeName;
  int? employeeId;
  String? dateStart;
  String? dateEnd;
  String? state;
  bool? isFocus;
  int? wage;
  String? workTime;
  String? jobName;

  ContractItemModel(
      {this.id,
        this.name,
        this.employeeName,
        this.employeeId,
        this.dateStart,
        this.dateEnd,
        this.state,
        this.isFocus,
        this.wage,
        this.workTime,
        this.jobName});

  ContractItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    employeeName = json['employee_name'];
    employeeId = json['employee_id'];
    dateStart = json['date_start'];
    dateEnd = json['date_end'];
    state = json['state'];
    isFocus = json['is_focus'];
    wage = json['wage'];
    workTime = json['work_time'];
    jobName = json['job_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['employee_name'] = this.employeeName;
    data['employee_id'] = this.employeeId;
    data['date_start'] = this.dateStart;
    data['date_end'] = this.dateEnd;
    data['state'] = this.state;
    data['is_focus'] = this.isFocus;
    data['wage'] = this.wage;
    data['work_time'] = this.workTime;
    data['job_name'] = this.jobName;
    return data;
  }
}
